package com.uchengwang.ui.cm_ui.rychat.utils;


import com.uchengwang.R;
import com.uchengwang.ui.cm_ui.rychat.bean.BigEmojicon;
import com.uchengwang.ui.cm_ui.rychat.bean.BigEmojiconEntityBean;

import java.util.Arrays;


public class BigEmojiconData {
    
    private static int[] icons = new int[]{
        R.drawable.icon_000_cover,
        R.drawable.icon_001_cover,
        R.drawable.icon_002_cover,
        R.drawable.icon_003_cover,
        R.drawable.icon_004_cover,
        R.drawable.icon_005_cover,
        R.drawable.icon_006_cover,
        R.drawable.icon_007_cover,
        R.drawable.icon_008_cover,
        R.drawable.icon_009_cover,
    };
    
    private static int[] bigIcons = new int[]{
            R.drawable.icon_000_cover,
            R.drawable.icon_001_cover,
            R.drawable.icon_002_cover,
            R.drawable.icon_003_cover,
            R.drawable.icon_004_cover,
            R.drawable.icon_005_cover,
            R.drawable.icon_006_cover,
            R.drawable.icon_007_cover,
            R.drawable.icon_008_cover,
            R.drawable.icon_009_cover,
    };
    private static int[] bigIconsSelf = new int[]{
            R.drawable.icon_000_cover_self,
            R.drawable.icon_001_cover_self,
            R.drawable.icon_002_cover_self,
            R.drawable.icon_003_cover_self,
            R.drawable.icon_004_cover_self,
            R.drawable.icon_005_cover_self,
            R.drawable.icon_006_cover_self,
            R.drawable.icon_007_cover_self,
            R.drawable.icon_008_cover_self,
            R.drawable.icon_009_cover_self,
    };

    private static String[] names = new String[]{
            "傻笑","色","困倦","哭笑","大哭","吃惊","羡慕","帅气","懵","发怒"
    };
    
    
    private static final BigEmojiconEntityBean DATA = createData();
    
    private static BigEmojiconEntityBean createData(){
        BigEmojiconEntityBean emojiconGroupEntity = new BigEmojiconEntityBean();
        BigEmojicon[] datas = new BigEmojicon[icons.length];
        for(int i = 0; i < icons.length; i++){
            datas[i] = new BigEmojicon(icons[i], null, BigEmojicon.Type.BIG_EXPRESSION);
            datas[i].setBigIcon(bigIcons[i]);
            datas[i].setBigIconSelf(bigIconsSelf[i]);
            //you can replace this to any you want
            datas[i].setName(names[i]);
            if (i <10){
                datas[i].setIdentityCode("icon_00"+ i);
            }else {
                datas[i].setIdentityCode("icon_0"+ i);
            }
        }
        emojiconGroupEntity.setEmojiconList(Arrays.asList(datas));
        emojiconGroupEntity.setIcon(R.drawable.icon_000_cover);
        emojiconGroupEntity.setType(BigEmojicon.Type.BIG_EXPRESSION);
        return emojiconGroupEntity;
    }
    
    
    public static BigEmojiconEntityBean getData(){
        return DATA;
    }

    //根据表情的identityCode 得到对应的EaseEmojicon
    public static BigEmojicon getEaseEmotion(String emojiconIdentityCode){
        for(BigEmojicon emojicon : DATA.getEmojiconList()){
            if(emojicon.getIdentityCode().equals(emojiconIdentityCode)){
                return emojicon;
            }
        }
        return null;
    }
}
